﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,minimal-ui">
<%@ include file="/WEB-INF/component/commonCSS.jsp"%>
<style type="text/css">
	#shclNs {
           position:fixed;
           left:0px;
           top:0px;
           width:100%;
           height:100%;
           opacity:0.75;
           -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(opacity=75)";
           filter:alpha(opacity=75);
           background-color: gray;
           margin:0px;
           padding:0px;
           z-index:999999;
           background:url('${ctx}/lib/img/loading.gif') no-repeat center center;
        }
</style>
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame" style="height:650px;overflow-y:scroll;"  >
<div id="shclNs" ></div>
<div class="box box-primary" id="more" style="width:110px;height:35px;background-color:#222c32;position:absolute;z-index:9999;left:850px;top:100px;display:none;font-size:12px;border-top-color:#222c32;">
            <div class="box-body home-message" id="moreOp" >
            </div>
</div>
	<section class="content-header">
		<h1>资审澄清</h1>
		<ol class="breadcrumb">
			<li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
			<li class="active"><a href="#">分类采购</a></li>
			<li class="active"><a href="#">药品招标管理</a></li>
			<li class="active"><a href="#">资质管理</a></li>
			<li class="active"><a href="#">资审澄清</a></li>
		</ol>
		
</section>
<section class="content" >
<div class=" box box-success"  >
<div id="wrapper">
<div id="content" ></div>
<script id="test" type="text/html">
  {{each rows as row i}}
			<div class="col-xs-6 col-lg-4 hei">
				<div class="wrapper2 ">
					<a id=""  href="javascript:showImg('{{row.profilePicAddr}}','{{row.profileName}}');" ><img class="img-responsive" border="0" src="${ctx}/{{row.profilePicShortcutAddr}}"></a>
					<div class="row" style=" margin-left: -12;margin-left: -23px;" >
						<div class="col-md-12">
							<p class="pull-left imgButton">																								
							    <button type="button" class="btn btn-primary btn-sm" style="margin-left: 1px;" id="submitDicCompType" onclick="edit('{{row.compprofileId}}','{{row.profileCode}}','{{row.profileName}}','{{row.profileStarttime}}','{{row.profileEndtime}}','{{row.profilePicAddr}}','{{row.remarks}}','{{row.projCompprofileId}}');" style="margin-left:10px">澄&nbsp;&nbsp;清</button>
							</p>
						</div>
					</div>

                    <div class="row" style="margin-left:0px">
						<div class="col-md-12">
							<p class="pull-left">
								<div class="productInfo" >&nbsp;资质编号:<span class="productInfo" name="profileCode" >{{row.profileCode}}</span></div>
							</p>
						</div>
					</div>
					<div class="row"  style="margin-left:0px">
						<div class="col-md-12">
							<p class="pull-left">
								<div class="productInfo" >&nbsp;资质名称:<span class="productInfo" name="profileCode" >{{row.profileName}}</span></div>
							</p>
						</div>
					</div>
					<div class="row"  style="margin-left:0px">
						<div class="col-md-12">
							<p class="pull-left">
								<div class="productInfo" >&nbsp;有效期:<span class="productInfo" name="profileTime" >{{row.profileStarttime}}&nbsp;至&nbsp;{{row.profileEndtime}}</span></div>
						    </p>
						</div>
					</div>
					<div class="row"  style="margin-left:0px">
						<div class="col-md-12">
							<p class="pull-left">
								<div class="productInfo" >&nbsp;资审时间:<span class="productInfo" name="profileTime" >{{row.auditDatetime}}</span></div>
						    </p>
						</div>
					</div>
					<div class="row"  style="margin-left:0px">
						<div class="col-md-12">
							<p class="pull-left">
								<div class="productInfo" >&nbsp;资审备注:<span class="productInfo" name="remarks" >{{row.auditRemark}}</span></div>
							</p>
						</div>
					</div>
					
				</div>
			</div>
 {{/each}}
</script>	
</div>
 <div class="row productall">
	      <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
			<div class="modal-dialog">
            	<div class="modal-content">
                	<div class="modal-header bg-primary">
                    	<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    	<h5 class="modal-title" id="exampleModalLabel">企业资质</h5>
                    </div>
               <form role="form" class="form-horizontal" id="FormSubmit" action="/medstgmini/bidProjcompprofile/complainResult.html" enctype="multipart/form-data" method="post">
                 <div class="box-body"> 
                    <div class="form-group form-group-xs">
                        <label class="col-sm-5 text-right"><span class="required">*</span>企业资质名称：</label>
                        <div class="col-sm-4 text-left">
                            <input class=" form-control" placeholder="企业资质名称" name="profileName" id="profileName" type="text" maxlength="64" value="">
                        </div>
                    </div>
             <!--        <div class="form-group form-group-xs">
                        <label class="col-sm-5 text-right"><span class="required">*</span>企业资质类型：</label>
                        <div class="col-sm-4 text-left">
                            <input class="form-control" placeholder="企业资质类型" type="text" name="profileType" id="profileType" maxlength="4" value="" >
                        </div>
                    </div> -->
                    <div class="form-group form-group-xs">
                        <label class="col-sm-5 text-right"><span class="required">*</span>有效期开始日期：</label>
                        <div class="col-sm-4 text-left">
                              <input class="form-control" type="text"  placeholder="有效期结束日期" name="profileStarttimeStr" id="createTimeBegin"    placeholder="yyyy-MM-dd"
	                                  onFocus="var endDate=$dp.$('createTimeEnd');WdatePicker({maxDate:'#F{$dp.$D(\'createTimeEnd\')}'})" maxlength="25"/>
                        </div>
                    </div>
                     <div class="form-group form-group-xs">
                        <label class="col-sm-5 text-right"><span class="required">*</span>有效期结束日期：</label>
                        <div class="col-sm-4 text-left">
                              <input class="form-control" type="text" placeholder="有效期结束日期" name="profileEndtimeStr" id="createTimeEnd"   placeholder="yyyy-MM-dd" maxlength="25"
	                       				onFocus="WdatePicker({minDate:'#F{$dp.$D(\'createTimeBegin\')}'})" />
                        </div>
                    </div>
                    <div class="form-group form-group-xs">
                        <label for="acctApprovalPicDir" class="col-sm-5 text-right"><span class="required">*</span>资质图片：</label>
                         <div class="">
                                     <input id="acctApprovalPicDir" name="licence" type="file" style="display:inline-none;" />
                                  </div>
                    </div>
                <    <div class="form-group form-group-xs">
                        <label class="col-sm-5 text-right">澄清备注：</label>
                        <div class="col-sm-4 text-left">
                              <textarea class="form-control"  placeholder="澄清备注" id="remark" name="complainRemark" maxlength="4000" ></textarea>
                        </div>
                    </div> 
                    <input type="hidden" id="projCompprofileId" name="projCompprofileId" value="" />
                    <input type="hidden" id="compprofileId" name="compprofileId" value="" />
                </div> 
            </form>
                    <div class="modal-footer" style="text-align: center;">
                     <input hidden="true" id="spid"/>
           			   <input hidden="true" id="spfatherid"/>
                        <button type="button" class="btn btn-primary btn-sm" id="submitDicCompType" onclick="save();">提&nbsp;交</button>
                        <button type="button" class="btn btn-danger btn-sm" data-dismiss="modal" id="closeDicCompType">关&nbsp;闭</button>
                    </div>
                </div>
            </div>
        </div>
	</div>

</div>
<div style="height:50px"></div>
</section>
 
<div class="mainA">
<div class="mainB"></div>
<div class="mainC"></div>
<div class="main" >
	<a href="javascript:history.go(-1)" class="btn btn-danger btn-sm">返&nbsp;回</a> 		 
</div>
</div>

</body>

<%@ include file="/WEB-INF/component/commonJS.jsp"%>
<script type="text/javascript">

var records = 0;//总条目
var postData = {"rows":3,"page":1};//rows 一页展示多少条   page当前页数
	$(function() {
		getList(postData);
	    $(window).scroll(function() {
            if ($(document).scrollTop() +30 >= $(document).height() - $(window).height()) {
            	postData.page++;
            	if (postData.page <=Math.ceil(records/postData.rows)) {
            		getList(postData);
            	} 
            }
         });
});
	function getList(postData){
		$("#shclNs").show();
			$.post('getNotPassResultList.html?projId=${projId}',
					postData, function(result) {
						if (result.success) {
							$("#shclNs").hide();
							var html = template('test', result);
							$('#content').append(html);
							records=result.records;  //总条数
						} else {
							$.HN.message.alert("数据获取失败", '信息', 'error');
						}
					}, "json");
		}
	
 	function edit(compprofileId, profileCode,profileName,profileStarttime,profileEndtime,profilePicAddr,remarks,projCompprofileId) {
		$('#profileCode').val("");
		$('#profileName').val("");
		$('#createTimeBegin').val("");
		$('#createTimeEnd').val("");
		$('#remark').val("");
		$('#acctApprovalPicDir').val("");
		$('#compprofileId').val("");
		$('#projCompprofileId').val("");
		$('#exampleModalLabel').html("产品资质编辑");
		$('#exampleModal').modal({
			keyboard : true
		});
		$('#profileCode').val(profileCode);
		$('#profileName').val(profileName);
		$('#createTimeBegin').val(profileStarttime);
		$('#createTimeEnd').val(profileEndtime);
		$('#remark').val(remarks);
		$('#compprofileId').val(compprofileId);
		$('#projCompprofileId').val(projCompprofileId);
	} 

	 function save(){
	    	if(!validateBase()){
	    		return;
	    	}
	    	$.HN.message.confirm('确定要提交吗？', '', '').on(function (e) {
	            if (e) {
	          	  $("#FormSubmit").ajaxSubmit({
	          		  dataType: "json",
	        		  timeout: 10000,
	          		  success: function(result,statusText) {
	              		if(result.success){
	              			document.location.reload();
	      	     			$.HN.message.alert('操作成功！', '提示信息', 'success');
	              		}else{
	              			$.HN.message.alert(result.msg || "提交失败！", "消息", "error");
	              		}
	          		  }
	    	   	  });
	          	  } 
	  	  });
	    }
    
    function validateBase() {
		var profileName = $.trim($("#profileName").val());
		if (profileName == null || profileName == "") {
			$.HN.message.alert("请输入企业资质名称！", "消息", "warn");
			return false;
		}
		var profileStarttime = $.trim($("#createTimeBegin").val());
		if (profileStarttime == null || profileStarttime == "") {
			$.HN.message.alert("请选择资质有效期开始日期！", "消息", "warn");
			return false;
		}
		var profileEndtime = $.trim($("#createTimeEnd").val());
		if (profileEndtime == null || profileEndtime == "") {
			$.HN.message.alert("请选择资质有效期截至日期！", "消息", "warn");
			return false;
		} 
		return true;
	}

	function showImg(imgPath,profileName) {
		var url = "/medstgmini/acctInfo/toImg.html";
		$.HN.dialog.open({
			"id" : "showImg",
			"title" : profileName,
			"url" : url,
			"data" : {
				"imgPath" : imgPath
			},
			"width" : 800,
			"height" : 400,
			"closefunc" : function(params) {
				if (params) {

				}
			}
		});
	}
</script>
</html>